﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;


namespace EBookStore.Users
{
    [DebuggerDisplay("firstName:{FirstName} ID:{ID}")]
    public class Customer : User
    {
        public string Adress { get; set; }
      
        public Customer(string login, string password, string firstName, string lastName, string adress)
            :base(login, password, firstName, lastName)
        {
            this.Adress = adress;
        }


        public Customer(string firstName, string lastName, string adress)
            : base(null, null, firstName, lastName)
        {
           
            this.Adress = adress;
            ConcreteValidator();
        }
        /// <summary>
        /// Validates address field of customer
        /// </summary>
        protected override void ConcreteValidator()
        {
            if (this.Adress == null)
            {
                throw new Exception("Concrete validation failed");
            }
        }

        #region Public Methods

       
        #endregion



    }
}
